This invention relates to software development and, more particularly, to a software inspection tool for scenario-based code inspections.
By way of background, a very time consuming part of software development is the process known as code inspection. In this process, the developer who has written some new code or changed some existing code calls a meeting of knowledgeable, interested parties to review the developer's work and to look for potential issues.
Code inspection collaboration tools have been developed by research teams (e.g., University of Hawaii's Jupiter product) and by companies (e.g., SmartBear Software's CodeCollaborator). These tools provide capabilities for sharing source code and comments to generally support a full top-down sequential reading code inspection process. In this process source files are read through line-by-line from top to bottom only once, examining all possible execution paths at the same time.
On the other hand, scenario-based reading techniques involve examining specific execution paths while examining the code. Thus, to support scenario-based reading techniques, it may be necessary to read through a function or section of code multiple times in order to investigate different paths though the code. It will also be necessary to keep track of what has been inspected and to examine the impact of referential code not included in any simple code differencing output.
The usage of scenario-based reading for code inspections presents several problems that are not solved by existing solutions. One is the need for marking lines inspected. When reading source code using a top-down sequential approach the path through the source code files is largely linear and keeping track of which lines have been inspected is relatively simple. When scenario-based reading techniques are used, code segments may be read multiple times, only reading certain subsets of the instructions on each pass through the code segment. A technique to keep track of what has been inspected is required.
Scenario-based reading also requires a tool to aid in finding source code that requires inspection but has not yet been inspected. In traditional code inspection reading techniques this is not required as files are typically processed linearly. With scenario-based reading many code paths are followed. Scenario-based inspections typically strive for 80% code coverage through the use of specific scenarios, and then rely on more traditional approaches to review lines missed by the specific scenarios. There is a need for a tool that provides an indication to the reviewer whether all lines to be inspected have been inspected, and, if not, the tool must provide direction to the places in the code that have not been inspected.
Existing code inspection tools support either full source code inspections, inspections of only changed source code, or both types. With scenario-based reading techniques, code inspections often require reading selected elements of unchanged code (or referential code) along with changed code. Tool support is needed to support generating inspection packages containing changed code plus selected code segments of referential code. For source languages that often separate definitions from declarations, these definition files are also useful in performing inspections when possibly only the declaration files were changed.
The present invention contemplates a new and improved code inspection tool that resolves the above-referenced difficulties and others.